﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ele21RHelp
{
    /// <summary>
    /// 族谱记忆.xaml 的交互逻辑
    /// </summary>
    public partial class 族谱记忆 : Window
    {
        List<string> check = new List<string>();
        public 族谱记忆()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (check.Count>4)
            {
                return;
            }
            Button button = (Button)sender;
            check.Add(button.Content.ToString());
            SetLable();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (check.Count==0)
            {
                return;
            }
            check.RemoveAt(check.Count-1);
            SetLable();
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            check.Clear();
            SetLable();
        }
        private void SetLable()
        {
            string value = "";
            foreach (var item in check)
            {
                value += item;
                value += " ";
            }
            swlb.Content = value;
            HelpClass.CopyTo(value);
        }
    }
}
